package com.test.auth_db_auto;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.oauth2.provider.endpoint.AuthorizationEndpoint;

/**
 * 网页运行：
 * http://localhost:8102/oauth/authorize?response_type=code&client_id=cms&redirect_uri=http://localhost:8084/cms/login&scope=all
 * http://localhost:8102/oauth/authorize?client_id=cms&response_type=code
 页面重定向返回回 redirect_uri，http://localhost:8084/cms/login?code=???
 * 用postman运行： 配置一下请求头的授权参数，用Basic Auth方式，username即client_id，password即client_secret
 *  http://localhost:8102/oauth/token?code=QlimbB&redirect_uri=http://localhost:8084/cms/login&grant_type=authorization_code&scope=all
 *  http://192.168.0.226:8102/oauth/authorize?client_id=cms&response_type=code
 *  刷新access_token
 *  http://localhost:8102/oauth/token?grant_type=refresh_token&refresh_token=a97dec95-ee1e-44ce-941c-4f6edfbcddb8
 * admin  123qwe
 * */
@SpringBootApplication
public class AuthDbAutoApplication {
    public static void main(String[] args) {
        SpringApplication.run(AuthDbAutoApplication.class, args);
    }
}
